package com.yang.repository;

import com.yang.entity.AudioRecord;
import com.yang.type.DigitalHumanStatusEnum;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

/**
 * 音频记录数据访问接口
 */
@Repository
public interface AudioRecordRepository
        extends JpaRepository<AudioRecord, Long>, JpaSpecificationExecutor<AudioRecord> {
    List<AudioRecord> findByStatusAndFailedCountLessThanOrderByIdAsc(
            DigitalHumanStatusEnum status, Integer failedCount);
}
